package com.ag.bean;

import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * TbType entity.
 * 
 * @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "TB_TYPE", schema = "dbo", catalog = "AGDB")
public class TbType implements java.io.Serializable {

	// Fields

	private String tpyeId;
	private String tpyeName;
	private String tpyeDetail;
	private String a;
	private String b;
	private String c;
	private Set<TbExpert> tbExperts = new HashSet<TbExpert>(0);
	private Set<TbClassiccase> tbClassiccases = new HashSet<TbClassiccase>(0);
	private Set<TbTeam> tbTeams = new HashSet<TbTeam>(0);
	private Set<TbLaw> tbLaws = new HashSet<TbLaw>(0);
	private Set<TbAidgoodsku> tbAidgoodskus = new HashSet<TbAidgoodsku>(0);

	// Constructors

	/** default constructor */
	public TbType() {
	}

	/** minimal constructor */
	public TbType(String tpyeId, String tpyeName) {
		this.tpyeId = tpyeId;
		this.tpyeName = tpyeName;
	}

	/** full constructor */
	public TbType(String tpyeId, String tpyeName, String tpyeDetail, String a,
			String b, String c, Set<TbExpert> tbExperts,
			Set<TbClassiccase> tbClassiccases, Set<TbTeam> tbTeams,
			Set<TbLaw> tbLaws, Set<TbAidgoodsku> tbAidgoodskus) {
		this.tpyeId = tpyeId;
		this.tpyeName = tpyeName;
		this.tpyeDetail = tpyeDetail;
		this.a = a;
		this.b = b;
		this.c = c;
		this.tbExperts = tbExperts;
		this.tbClassiccases = tbClassiccases;
		this.tbTeams = tbTeams;
		this.tbLaws = tbLaws;
		this.tbAidgoodskus = tbAidgoodskus;
	}

	// Property accessors
	@Id
	@Column(name = "TPYE_ID", unique = true, nullable = false, length = 4)
	public String getTpyeId() {
		return this.tpyeId;
	}

	public void setTpyeId(String tpyeId) {
		this.tpyeId = tpyeId;
	}

	@Column(name = "TPYE_NAME", nullable = false, length = 50)
	public String getTpyeName() {
		return this.tpyeName;
	}

	public void setTpyeName(String tpyeName) {
		this.tpyeName = tpyeName;
	}

	@Column(name = "TPYE_DETAIL", length = 500)
	public String getTpyeDetail() {
		return this.tpyeDetail;
	}

	public void setTpyeDetail(String tpyeDetail) {
		this.tpyeDetail = tpyeDetail;
	}

	@Column(name = "A", length = 50)
	public String getA() {
		return this.a;
	}

	public void setA(String a) {
		this.a = a;
	}

	@Column(name = "B", length = 50)
	public String getB() {
		return this.b;
	}

	public void setB(String b) {
		this.b = b;
	}

	@Column(name = "C", length = 50)
	public String getC() {
		return this.c;
	}

	public void setC(String c) {
		this.c = c;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tbType")
	public Set<TbExpert> getTbExperts() {
		return this.tbExperts;
	}

	public void setTbExperts(Set<TbExpert> tbExperts) {
		this.tbExperts = tbExperts;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tbType")
	public Set<TbClassiccase> getTbClassiccases() {
		return this.tbClassiccases;
	}

	public void setTbClassiccases(Set<TbClassiccase> tbClassiccases) {
		this.tbClassiccases = tbClassiccases;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tbType")
	public Set<TbTeam> getTbTeams() {
		return this.tbTeams;
	}

	public void setTbTeams(Set<TbTeam> tbTeams) {
		this.tbTeams = tbTeams;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tbType")
	public Set<TbLaw> getTbLaws() {
		return this.tbLaws;
	}

	public void setTbLaws(Set<TbLaw> tbLaws) {
		this.tbLaws = tbLaws;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tbType")
	public Set<TbAidgoodsku> getTbAidgoodskus() {
		return this.tbAidgoodskus;
	}

	public void setTbAidgoodskus(Set<TbAidgoodsku> tbAidgoodskus) {
		this.tbAidgoodskus = tbAidgoodskus;
	}

}